# -*- coding: utf-8 -*-
# Python 将字符串作为代码执行

def exec_code():
    LOC = """
def factorial(num):
    fact = 1
    for i in range(1, num + 1):
        fact *= i 
    return fact

print(factorial(5))
"""
    exec(LOC)

exec_code()